#ifndef SPACESHIP_H
#define SPACESHIP_H

#include "pgObjects.h"

class SpaceShip : public pgObjects{
public:
	enum{
		BODYPART_CHASSIS=0,
		BODYPART_COUNT
	};
	enum{
		//JOINT=0,
		JOINT_COUNT=0
	};
public:
	SpaceShip();
	SpaceShip(const btVector3& positionOffset);
	~SpaceShip();
	
	btDynamicsWorld* m_ownerWorld;
	btCollisionShape* m_shapes[BODYPART_COUNT];
	btRigidBody* m_bodies[BODYPART_COUNT];
	btTypedConstraint* m_joints[JOINT_COUNT];

	static btAlignedObjectArray<class SpaceShip*> m_spaceships;
	static void deleteAllSpaceShips();

	void setObjectState(int state);
};

#endif